#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int i;
	scanf("%d", &i);
	int sum = 1;
	for (;i > 0 ;i -- )
	{
		sum = sum * i; 
	}
	printf("%d\n", sum);
}